import Home from "@/views/admin/Home.vue";
import AdminIndex from "@/views/admin/AdminIndex.vue";
import Catalogue from "@/views/admin/Catalogue.vue";
import UserList from "@/views/admin/UserList.vue";
import DocSize from "@/views/admin/DocSize.vue";
import Language from "@/views/admin/Language.vue";
import BookType from "@/views/admin/BookType.vue";
import Publish from "@/views/admin/Publish.vue";
import UserInfo from "@/views/common/UserInfo.vue";

const adminRouter = {//所有的组件要跳转，必须先命名路由
  path: '/admin', //访问的url
  name: 'adminindex',
  component: AdminIndex,
  meta: {title: '首页'},
  redirect: "/admin/home",
  children: [
    // {path: '/admin/login', redirect: to => '/login'},
    {path: '/admin/home', name: 'home', meta: {title: '首页'}, component: Home},
    {path: '/admin/info', name: 'info', meta: {title: '个人信息'}, component: UserInfo},
    {path: '/admin/catalogue', name: 'catalogue', meta: {title: '编目管理'}, component: Catalogue},
    {path: '/admin/userlist', name: 'adminuserlist', meta: {title: '用户管理'}, component: UserList},
    {path: '/admin/size', name: 'DocSize', meta: {title: '文献尺寸管理'}, component: DocSize},
    {path: '/admin/language', name: 'Language', meta: {title: '文献语种管理'}, component: Language},
    {path: '/admin/type', name: 'BookType', meta: {title: '文献类型管理'}, component: BookType},
    {path: '/admin/publish', name: 'Publish', meta: {title: '出版社管理'}, component: Publish},
  ]
}

export default adminRouter
